(function() {
var html = '<style type="text/css">' +
	'.footer{background-color: #fff;border-top:1px solid #d3cdcda8;}' +
	'.footer a{text-decoration: none;}' +
	'.footer, .footer a, .footer p a {font-size: 12px;font-family: "Microsoft Yahei";color: #999;}' +
	'.footer p,.footer .links{line-height: 24px;margin: 0;}' +
	'.footer .footer-wrap{width: 1000px;margin: 0 auto;padding: 5px 0 10px;}' +
	'.footer .footer-logo{float: left;}' +
	'.footer .footer-block-ele{float: right;}' +
	'.clearfix:after {content: ".";display: block;height: 0px;visibility: hidden;clear: both;}' +
	'.footer i {font-style: normal;margin: 0 6px;}' +
	'.footer .footer-block-ele.dark *{color: #666666;}' +
	'.footer .footer-block{position: relative;margin: 15px 0}' +
	'.footer .footer-qrcode{right:0;top:0;position: absolute;}' +
	'.footer .footer-qrcode img{width: 95px;height: 95px}' +
	'.footer .footer-wrap-bott{background-color: #f5f5f5;padding: 20px 0;}' +
	'.footer .footer-wrap-bott .footer-block{width: 1000px;margin:0 auto;}' +
	'.footer .footer-wrap-bott .footer-block a{margin-right: 10px;}' +
	'.footer a img{vertical-align: middle;}' +
	'</style>' /*+
	'<div class="footer">' +
	'<div class="footer-wrap">' +
	'<div class="footer-block clearfix">' +
	'<a href="" class="footer-logo">' +
	'<img src="//webres.61.com/common/images/taomee.png">' +
	'</a>' +
	'<div class="footer-block-ele dark">' +
	'<div class="links"><a target="_blank" rel="nofollow" href="http://www.taomee.com/about/" title="关于淘米">关于淘米</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://www.taomee.com/about/contact.html" title="联系我们">联系我们</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://game.61.com/coopera/" title="商务合作">商务合作</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="https://jobs.51job.com/all/co6352928.html#syzw" title="淘米招聘">淘米招聘</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://www.61.com/about/protect.html" title="用户隐私政策">用户隐私政策</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://www.61.com/about/service.html" title="淘米服务条款">淘米服务条款</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="https://account.61.com/" title="淘米账号注销">淘米账号注销</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://parents.61.com/" title="家长监护工程">家长监护工程</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://fcm.61.com" title="防沉迷系统">防沉迷系统</a></div>' +
	'<p>上海淘米网络科技有限公司 Copyright©2008-' + new Date().getFullYear() + ' TaoMee Inc. All Rights Reserved</p>' +
	'</div>' +
	'</div>' +
	'<div class="footer-block clearfix">' +
	'<p>抵制不良游戏&emsp;拒绝盗版游戏&emsp;注意自我保护&emsp;谨防受骗上当&emsp;适度游戏益脑&emsp;沉迷游戏伤身&emsp;合理安排时间&emsp;享受健康生活</p>' +
	'<p id="J_versionInfo"></p>' +
	'<div class="links"><a target="_blank" rel="nofollow" href="http://kf.61.com/" title="QQ公众号">QQ公众号：800006461</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://kf.61.com/" title="客服中心：kf.61.com">客服中心：kf.61.com</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://kf.61.com/" title="淘米游戏客服官方微信号：taomeekf">淘米游戏客服官方微信号：taomeekf</a><i class="divide">|</i><a target="_blank" rel="nofollow" href="http://kf.61.com/" title="未成年人家长监护专线">未成年人监护专线：021-61733769（9:00-21:00）</a></div>' +
	'<div class="links"><a target="_blank" rel="nofollow" href="http://kf.61.com/" title="互联网违法和不良举报电话">互联网违法和不良举报电话：021-61733766（9:00-21:00）</a><i class="divide">|</i><a href="mailto:blxxjb@taomee.com" title="举报邮箱">举报邮箱：blxxjb@taomee.com</a></div>' +
	'<div class="footer-qrcode"><img src="//support-res.61.com/service/images/service/kfwx.png"></div>' +
	'</div>' +
	'</div>' +
	'<div class="footer-wrap-bott">' +
	'<div class="footer-block">' +
	'<p>增值电信许可证：<a href="http://www.taomee.com/files/icp/" target="_blank">沪B2-20090070</a>网络文化许可证：<a href="http://www.taomee.com/files/" target="_blank">沪文网[2021]1408-108号</a>互联网出版许可证：<a href="http://www.taomee.com/files/ipl/" target="_blank">新出网证(沪)字023号</a></p>' +
	'<p id="J_gs_info"></p>' +
  '<p><a target="_blank" href="https://www.12377.cn/"><img src="//webres.61.com/common/images/footer/youhaixinxi.png" style="width:20px">网上有害信息专区</a><a href="http://www.shjbzx.cn/" target="_blank"><img src="//webres.61.com/common/images/footer/shjubao.png" style="width:20px">上海市互联网违法和不良信息举报中心</a></p>' +
	'</div>' +
	'</div>' +
	'</div>';*/
var footer = document.createElement('div');
document.body.appendChild(footer);
footer.innerHTML = html;

var win = window;
var docs = document;
var url = top.location.hostname || docs.location.hostname;
  if(url == "h5.61.com" || url == "h5.test.61.com"){
      var p = top.location.pathname || docs.location.pathname;
      if(p.indexOf('/game/') !== -1){
          var g = document.URL.split('/game/')[1];
          g = g.split('/')[0];
          if(g){
              url = g + '.61.com';
          }
      }
  }
var gs_tm =
	'工信部网站备案：<a href="http://beian.miit.gov.cn/" target="_blank">沪B2-20090070-1</a>&nbsp;<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010402000141"><img src="//webres.61.com/common/images/footer/bei_an.png" style="width: 20px;">沪公网安备：31010402000141号</a>';
var gs_61 =
	'工信部网站备案：<a href="http://beian.miit.gov.cn/" target="_blank">沪B2-20090070-4</a>&nbsp;<a target="_blank" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=31010402000181"><img src="//webres.61.com/common/images/footer/bei_an.png" style="width: 20px;">沪公网安备：31010402000181号</a>';
var gs_tm_pic =
	'<a href="http://218.242.124.22:8081/businessCheck/verifKey.do?showType=extShow&amp;serial=9031000020170418145123000001719101-SAIC_SHOW_310000-11742E71114C4A2F80A892B7F53BC9D9706&amp;signData=MEYCIQCLmO9TZGM//X5WnaD6npK1HvF6/HGzehxC1gnE/fx4IQIhAO3UeeNs+hfFwJ5EaA6173JpnGttqGy96Zah8YX+VYje" target="_blank"><img src="//webres.61.com/common/images/footer/shgsdz.png"></a>';
var gs_61_pic =
	'<a href="http://www.sgs.gov.cn/lz/licenseLink.do?method=licenceView&amp;entyId=201205111446596" target="_blank"><img src="//webres.61.com/common/images/footer/shgsdz.png"></a>';
win.callback_game_versions = function(res) {
	for (var i = 0; i < res.length; i++) {
		if (res[i].url == url) {
			docs.getElementById('J_versionInfo').innerHTML = res[i].content;
		}
	}
}
var e = document.createElement("script");
e.src = "//game.61.com/game_versions.json?r=" + Math.random();
e.type = "text/javascript";
var p = document.getElementsByTagName("script")[0];
p.parentNode.insertBefore(e, p);
if (url.indexOf('61.com') > -1) {
	docs.getElementById('J_gs_info').innerHTML = gs_61;
} else if (url.indexOf('taomee.com') > -1) {
	docs.getElementById('J_gs_info').innerHTML = gs_tm;
}
})();
